package net.zjitc.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

/**
 * @auther 郭梦婷
 * @create 2022-05-23 17:13:07
 * @describe 实体类
 */
@TableName("role")
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value="Role对象", description="")
@Data
public class Role implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "权限id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "角色名称")
    @TableField("roleName")
    private String rolename;

    @ApiModelProperty(value = "权限ids,1,2,5")
    @TableField("psids")
    private String psids;

    @ApiModelProperty(value = "权限描述")
    @TableField("roledesc")
    private String roledesc;

    @TableField(exist = false)
    private List<Permission> permissions;




    @Override
    public String toString() {
        return "Role{" +
                "id=" + id +
                ", rolename=" + rolename +
                ", psids=" + psids +
                ", roledesc=" + roledesc +
        "}";
    }
}